package com.fzy.core;

import java.util.Map;

import com.opensymphony.xwork.ActionInvocation;
import com.opensymphony.xwork.ActionProxy;
import com.opensymphony.xwork.ActionProxyFactory;

public class MyActionProxyFactory extends ActionProxyFactory {

    public MyActionProxyFactory() {
        super();
    }


    public ActionInvocation createActionInvocation(ActionProxy actionProxy) throws Exception {
        return new MyActionInvocation(actionProxy);
    }

    public ActionInvocation createActionInvocation(ActionProxy actionProxy, Map extraContext) throws Exception {
        return new MyActionInvocation(actionProxy, extraContext);
    }

    public ActionInvocation createActionInvocation(ActionProxy actionProxy, Map extraContext, boolean pushAction) throws Exception {
        return new MyActionInvocation(actionProxy, extraContext, pushAction);
    }

    /**
     * Use this method to build an MyActionProxy instance.
     */
    public ActionProxy createActionProxy(String namespace, String actionName, Map extraContext) throws Exception {
        return new MyActionProxy(namespace, actionName, extraContext, true, true);
    }

    /**
     * Use this method to build an MyActionProxy instance.
     */
    public ActionProxy createActionProxy(String namespace, String actionName, Map extraContext, boolean executeResult, boolean cleanupContext) throws Exception {
        return new MyActionProxy(namespace, actionName, extraContext, executeResult, cleanupContext);
    }
}
